home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / AfKayAs CrackMe #2.txt < prev    next >
Encoding:
Text File  |  1999-07-28  |  5.6 KB  |  140 lines

  1. Hello this is Doctor Scoop writing...
  2.  
  3. Since I'm a newbiee in the great world of cracking, please let me know if I have misunderstood something, or if you just have some comments to this solution.
  4.  
  5. My Email: Doctor_Scoop@Hotmail.com
  6.  
  7.  
  8. The target:     AfKayAs Crackme #2
  9. Url:        http://crackmes.cjb.net   (The best CrackMe-site)
  10. Problem:    Name/Serial an a NAG-screen
  11. Tools used:    Smartcheck v6.01 and Hiew v6.0
  12.  
  13. Here goes:
  14.  
  15.  
  16. Part 1 - The Name/Serial
  17.  
  18. Since the program is made with VB my first chiose is to use Smartcheck which is a great crackertool, if you want to crack VB-apps. 
  19.  
  20. Step 1 - Launch the taget from Smartcheck (Remember to set on "Show all Events" and Arguments)
  21.  
  22. If you don't know how to setup Smartcheck, then goto http://crackmes.cjb.net. Eternal Bliss has made a great tutorial about this subject.
  23.  
  24. Now the NAG will show for 7 sec. (don't worry, we will take care of that later, hehe) and then the Name/Serial part will pop up. I typed "Doctor Scoop" and "77777". When the "OK" is pressed a Bad guy-Msgbox will appear saying "You get Wrong - Try again" - Damn, not my lucky day :(
  25.  
  26. Hit the "CANCEL" to you will get back to Smartcheck.
  27.  
  28. Step 2 - Fish the serial from Smartcheck
  29.  
  30. Hit Ctrl-F to search for the entered name, I only searched for "Doctor"
  31. Smartcheck now jumps to the place, where the calculation is beeing done.
  32.  
  33. Len(String:"Doctor Scoop") returns LONG:12
  34. Asc(String:"Doctor Scoop") returns Integer:68
  35.  
  36. The first line returns the lenght of the entered name (12), the second line returs the ASCII-value of the first enteres letter (D = 68h)
  37.  
  38. I will only show some of the important lines
  39.  
  40. Regserial.text  <-- "1066724" (String)         
  41. Regserial2.text  <-- "1066726" (String)        
  42. Regserial3.text  <-- "3200176" (String)        
  43. Regserial4.text  <-- "3200191" (String)     
  44.  
  45. A few lines below the Bad guy-Msgbox is launched.
  46.  
  47. Hmmm, now launch the program again. 
  48.  
  49. Name     = Doctor Scoop
  50. Serial     = 3200191
  51.  
  52. A new msgbox will appear "You Get It - KeyGen It Now".........Easy!!
  53.  
  54.  
  55. Part 1.2 - Make KeyGen
  56.  
  57. Lets have a look again at the lines from above
  58.  
  59. Len(String:"Doctor Scoop") returns LONG:12
  60. Asc(String:"Doctor Scoop") returns Integer:68
  61. Regserial.text  <-- "1066724" (String)         : Value calculated from Name
  62. Regserial2.text  <-- "1066726" (String)        : Regserial + 2
  63. Regserial3.text  <-- "3200176" (String)        : (Regserial2 * 3) - 2
  64. Regserial4.text  <-- "3200191" (String)     : Regserial3 + 15
  65.  
  66. We must assume the 12 and the 68 are beeing user to calculate the first value.
  67. If the name had been "Doctor Scoop!" the values had looked like this:
  68.  
  69. Len(String:"Doctor Scoop") returns LONG:13
  70. Asc(String:"Doctor Scoop") returns Integer:68
  71. Regserial.text  <-- "1155612" (String)         : Value calculated from Name
  72. Regserial2.text  <-- "1155614" (String)        : Regserial + 2
  73. Regserial3.text  <-- "3466840" (String)        : (Regserial2 * 3) - 2
  74. Regserial4.text  <-- "3466855" (String)     : Regserial3 + 15
  75.  
  76. Now look at the difference between the twe Regserial.text
  77. (1155612-1066724 = 88888)
  78.  
  79. It could look like each letter has the value of 88888. Let's try to calculate:
  80.  
  81. 12 * 88888         = 1066656 
  82. Our first Regserial    = 1066724  (We are very close - look at the difference)
  83.  
  84. 1066724 - 1066656 = 68 (which is excatly the Hexvalue of our first letter!!)
  85.  
  86. Now we have enough to make a KeyGen in VB:
  87.  
  88. Create a new project with 2 textboxes (Text1 for the name, and Text2 for the serial) and 1 commandbutton.
  89.  
  90. Now insert the following code: 
  91.  
  92. Private Sub Command1_Click()
  93. Text2 = (((Asc(Text1) + (Len(Text1) * 88888) + 2) * 3) - 2 + 15)
  94. End Sub
  95.  
  96. Thats all.
  97.  
  98. (Asc(Text1) + (Len(Text1) * 88888)         : generates Regserial.text
  99. (Asc(Text1) + (Len(Text1) * 88888)+2        : generates Regserial2.text
  100. (((Asc(Text1) + (Len(Text1) * 88888)+2)*3)-2)    : generates Regserial3.text
  101. (((Asc(Text1) + (Len(Text1) * 88888)+2)*3)-2+15): generates Regserial4.text <-- Valid Serial
  102.  
  103. ----------------------------------------------------------------
  104.  
  105. Part 2 - The NAG-screen
  106.  
  107. I have never cracked a VB-NAG before, so this was for me the hard part. First I searched the net for tutorials about this subject....But I was unsuccesfull :(
  108.  
  109. Then I tried the Softice-way, but I didn't know where to set the breakpoint. I tried using "CreateCombatibleBitmap" and traced from there. I did find the where NAG was launched but I couldn't find where to patch. So i tried to put a bpx on SetTimer.........SetTimer, I think I saw that in Smartcheck. Try to search for Settimer in Smartcheck.
  110.  
  111. I was right, Smartcheck did give me some info on settimer...If you look at the right window you will see this very important info (and some useless info).
  112.  
  113. unsigned long uElapse = 7000 0x00001B58
  114.  
  115. This tells us that the NAG is shown in 7 sec. (7000). the 1B58 is the Hex-value of 7000.
  116.  
  117. Hmmmmm, the time (7000) must be hardcoded in the file.
  118.  
  119. Lets load the Crackme into Hiew.
  120.  
  121. Hit F4 to view i HEX
  122.  
  123. Hit F7 to search.....Search for "58 1B", which is 7000 in HEX pushed backwards.
  124.  
  125. They should be found at 00005B75.
  126.  
  127. Hit F3 to edit. Then change "58 1B" to "01 00" and then hit F9 to update.
  128.  
  129. Exit Hiew and run the Crackme.....The NAG is just on the screen for a splitsecond - It is killed.
  130.  
  131. To check if I just was lucky, I coded a NAG myself, and guess what. The method worked here to. :)
  132.  
  133. I know it is not a complete removal, but allllllmost.
  134.  
  135. IMPORTANT: Do NOT change the time to 0, then the NAG will never go away.
  136.  
  137. ---------------------------------------------------------
  138. Thanks to all crackers who have written CrackMes and/or tutorials, they have sure helped me a lot. 
  139.  
  140. Please mail comments to Doctor_Scoop@Hotmail.com